/********************************************************************************
 * @file   gkt_compiler_iar.h
 * @brief  IAR Compiler header file
 * @date   8/Oct/2018
 ********************************************************************************/
 
#ifndef GKT_COMPILER_IAR_H
#define GKT_COMPILER_IAR_H

#ifndef __ASM
#define __ASM	__asm
#endif

#ifndef __NO_RETURN
#define __NO_RETURN	__noreturn
#endif

#ifndef __USED
#define __USED	__root
#endif

#ifndef __WEAK
#define __WEAK	__weak
#endif

#ifndef __UNALIGNED_UINT32
__packed struct T_UINT32 { uint32_t v; };
#define __UNALIGNED_UINT32(x)	(((struct T_UINT32 *)(x))->v)
#endif

#ifndef __ALIGNED
#warning No compiler specific solution for __ALIGNED. __ALIGNED is ignored.
#define __ALIGNED(x)
#endif

#ifndef __PACKED
#define __PACKED	__packed
#endif

#ifndef __PACKED_STRUCT
#define __PACKED_STRUCT	__packed struct
#endif

#endif

